#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, Fabian Greif
# Copyright (c) 2018, Niklas Hauser
#
# This file is part of the modm project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.


def init(module):
    module.name = ":test:processing"
    module.description = "Tests for Processing"


def prepare(module, options):
    module.depends(
        "modm:architecture",
        "modm:math:utils",
        "modm:math:filter",
        "modm:processing:fiber",
        "modm:processing:protothread",
        "modm:processing:resumable",
        "modm:processing:timer",
        "modm:processing:scheduler",
        ":mock:clock")
    return True


def build(env):
    env.outbasepath = "modm-test/src/modm-test/processing"
    env.copy("fiber")
    env.copy("scheduler")
    env.copy("timer")
    if not env.get("modm:processing:protothread:use_fiber", True):
        env.copy("protothread")
        env.copy("resumable")
